package message;

import model.RoomInfo;
import socket.ChessClient;

public class ServerRoomPlayerMessage extends BaseMessage {
    private RoomInfo roomInfo;

    public ServerRoomPlayerMessage(RoomInfo roomInfo) {
        this.roomInfo = roomInfo;
    }

    @Override
    public void sendToServer() {

    }

    @Override
    public void selfExecute() {
        if (ChessClient.getInstance().getRoom() == null) {
            return;
        }
        ChessClient.getInstance().getRoom().setAnotherPlayerPanel(roomInfo);
    }
}
